

package Connect;

import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.Popup;
import javax.swing.PopupFactory;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;

import messaging.Notification;
import messaging.NotificationManager;
import ui.BoardUI;
import ui.BoardDisplay;
import concrete.Player;
import concrete.Token;

/*
 * GameController is meant to handle all complex button/model interactions. 
 * GameController should have access to all real models and control game state.
 * 
 *  
 */
public class GameController implements ActionListener {
	
	BoardUI boardUI;

	String[] namesAndIcons_;
	int numOfPlayers_ = 8;
	
	
	
	final int NUM_OF_SPACES = 40;
	
	// Suggested integer for keeping track of the state of game
	int currentPlayerNum_;
	
	public GameController(BoardUI b) {
		boardUI = b;
	
		
		
		NotificationManager.getInstance().addObserver(Notification.START_GAME, 
				this, "startGame");
		
	}
	
	// Called by the START_GAME notification
	public void startGame(Object obj) {
		namesAndIcons_ =(String[]) obj;
		numOfPlayers_ = Integer.parseInt(namesAndIcons_[0]);
		
		createPlayers();
		
	}
	
	
	private void createPlayers() {
		
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
	}
	

}
